-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Fix licence check #694
Conversation
Move the configuration of the license plugin into the plugin management section to override the parent POM. Create two profiles: one profile for adding license headers and apply formatting, and another profile for only checking if license headers are present. The second profile is used in the CI. The first profile is used by default for local development.
The missing license headers were generate using the licence Maven plugin.
@korthout just a small fix in the build to enable the license plugin again. Please have a look when you have time. 🍪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool stuff! ©️
LGTM 👍
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 One thing to remember with activeByDefault
is that it will be deactivated automatically when any other profile is activated. I always thought this was unexpected. There exist some solutions to deal with this (I personally like activeProfile
best), if you wish to take that route.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know. Thank you for the hint. 👍
.github/workflows/build-maven.yml
Outdated
run: mvn -B clean verify com.mycila:license-maven-plugin:check | ||
run: mvn -B clean -P !autoFormat,checkFormat verify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 With activeByDefault
you don't need to disable the autoFormat
profile. Simply by activating the checkFormat
profile, the autoFormat
profile will already be disabled.
The autoFormat profile is activated by default. If the checkFormat profile is enabled, the default profile is disable.
Description
Related issues